package cn.edu.hnu.matching.job.cycle;

import cn.edu.hnu.matching.manager.RedissonManager;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时任务，更新用户推荐缓存池
 */
@Component
@RequiredArgsConstructor
public class UpdateUserRecommendCachePool {

    private final RedissonManager redissonManager;

    @Scheduled(cron = "0 0 0 1/1 * ?")
    public void updateUserRecommendCachePool() {
        redissonManager.cacheUserRecommendPool();
    }

}
